home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 125 / Computer Shopper CD-ROM Issue 125 (1998-07)(Dennis Publishing).iso / Business / Dazzler / DAZZLER.Z / CEffectData.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-11-26  |  1.2 KB  |  42 lines

  1. import java.io.DataInputStream;
  2.  
  3. class CEffectData {
  4.    public static final int None = 0;
  5.    public static final int Reveal = 1;
  6.    public static final int Fade = 2;
  7.    public static final int Blend = 3;
  8.    public static final int Push = 4;
  9.    public static final int Zoom = 5;
  10.    public static final int Fly_on = 6;
  11.    public static final int Direct3D = 7;
  12.    public static final int EFFECT_WAIT = 16384;
  13.    protected short m_cEffectType = 0;
  14.    protected short m_cEffect = 0;
  15.    protected short m_cStepWidth = 2;
  16.    protected short m_cSpeed = 5;
  17.    protected int m_nFlags = 16384;
  18.  
  19.    boolean LoadFromFile(DataInputStream var1) {
  20.       FileLoad.ReadClass(var1);
  21.       this.m_cEffectType = FileLoad.ReadCPlusByte(var1);
  22.       this.m_cEffect = FileLoad.ReadCPlusByte(var1);
  23.       this.m_cStepWidth = FileLoad.ReadCPlusByte(var1);
  24.       this.m_cSpeed = FileLoad.ReadCPlusByte(var1);
  25.       this.m_nFlags = FileLoad.ReadCPlusInt(var1);
  26.       FileLoad.ReadCString(var1);
  27.       if (Globals.CUR_COURSE.m_nFileVersion > 3) {
  28.          FileLoad.ReadCString(var1);
  29.       }
  30.  
  31.       return true;
  32.    }
  33.  
  34.    public boolean HasValidClearEffect() {
  35.       return this.m_cEffectType == 1 && this.m_cEffect > 0;
  36.    }
  37.  
  38.    public boolean HasValidEffect() {
  39.       return this.m_cEffectType != 0 && (this.m_cEffectType != 1 || this.m_cEffect != 0);
  40.    }
  41. }
  42.